package com.saml.demo.sp.constants;

/**
 * Created by Privat on 4/7/14.
 */
public class SPConstants {
    // 和Azure -> 单一登录配置的identifier对应
    public static final String SP_ENTITY_ID = "https://www.luolineya.xyz";
    // 处理IDP登录响应的地址，和和Azure -> 单一登录配置的Reply URL对应
    public static final String ASSERTION_CONSUMER_SERVICE = "https://www.luolineya.xyz/sp/spconsumer/loginconsume";

    // SSO_SERVICE和ARTIFACT_RESOLUTION_SERVICE在Azure单点登录的配置页面Set up SamlTest中找到
    // IDP提供的统一用户登录页面地址
    public static final String SSO_LOGIN_SERVICE = "https://login.microsoftonline.com/80ca8ecc-6a59-480c-89ab-486b20aa72cb/saml2";
    // IDP用户注销地址
    public static final String SSO_LOGOUT_SERVICE = "https://login.microsoftonline.com/80ca8ecc-6a59-480c-89ab-486b20aa72cb/saml2";
    // 下面的这个注销地址不对，太坑了，注销地址在在App registrations页面选择应用，然后点击上面的Endpoints按钮，复制SAML -P sing-out endpoint的地址
//    public static final String SSO_LOGOUT_SERVICE = "https://login.microsoftonline.com/common/wsfederation?wa=wsignout1.0";

    // IDP的接收到authRequest后，返回标记，然后根据该地址，使用标识去查询authResponse，Azure不需要
//    public static final String ARTIFACT_RESOLUTION_SERVICE = "https://sts.windows.net/80ca8ecc-6a59-480c-89ab-486b20aa72cb/";

    // AttributeStatement中描述用户邮箱的属性名称
    public static final String USER_ACCOUNT_ATTR_NAME = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress";

    // 以下是SP内部业务自己需要的东西，根据业务需要选择
    public static final String USER_ACCOUNT = "userEmail";

    public static final String GOTO_URL_SESSION_ATTRIBUTE = "gotoURL";
}
